import Form from '../components/common/a-form.vue'
import Table from '../components/common/a-table.vue'
import Pagination from '../components/common/a-pagination.vue'
import Dialog from '../components/common/a-dialog.vue'
import Card from '../components/common/a-card.vue'
import Link from '../components/common/a-link.vue'

import Search from '../components/a-search.vue'
import Charts from '../components/common/a-charts.vue'
import Dept from '../components/common/a-dept.vue'
import Dept2 from '../components/common/a-dept2.vue'
import Upload from '../components/common/a-upload.vue'
import UploadData from '../components//a-upload-data.vue'

import {
  ElLink,
  ElButton,
  ElConfigProvider,
  ElDatePicker,
  ElDialog,
  ElEmpty,
  ElForm,
  ElInput,
  ElMenu,
  ElPagination,
  ElScrollbar,
  ElSelect,
  ElTable,
  ElText,
  ElTag,
  ElTabs,
  ElDropdown,
  ElTooltip,
  ElTree,
  ElUpload,
  ElPopconfirm
} from 'element-plus'

export default {
  install(app: App) {
    app.component(Link.name!, Link)
    app.component(Form.name!, Form)
    app.component(Table.name!, Table)
    app.component(Pagination.name!, Pagination)
    app.component(Card.name!, Card)
    app.component(Search.name!, Search)
    app.component(Dialog.name!, Dialog)
    app.component(Charts.name!, Charts)
    app.component(Dept.name!, Dept)
    app.component(Dept2.name!, Dept2)
    app.component(Upload.name!, Upload)
    app.component(UploadData.name!, UploadData)

    app.component('el-popconfirm', ElPopconfirm)
    app.component('el-upload', ElUpload)
    app.component('el-input', ElInput)
    app.component('el-button', ElButton)
    app.component('el-menu', ElMenu)
    app.component('el-menu-item', ElMenu.MenuItem)
    app.component('el-sub-menu', ElMenu.SubMenu)
    app.component('el-table', ElTable)
    app.component('el-table-column', ElTable.TableColumn)
    app.component('el-pagination', ElPagination)
    app.component('el-config-provider', ElConfigProvider)
    app.component('el-form', ElForm)
    app.component('el-form-item', ElForm.FormItem)
    app.component('el-select', ElSelect)
    app.component('el-option', ElSelect.Option)
    app.component('el-date-picker', ElDatePicker)
    app.component('el-dialog', ElDialog)
    app.component('el-text', ElText)
    app.component('el-tree', ElTree)
    app.component('el-empty', ElEmpty)
    app.component('el-scrollbar', ElScrollbar)
    app.component('el-tag', ElTag)
    app.component('el-tabs', ElTabs)
    app.component('el-tab-pane', ElTabs.TabPane)
    app.component('el-dropdown', ElDropdown)
    app.component('el-dropdown-menu', ElDropdown.DropdownMenu)
    app.component('el-dropdown-item', ElDropdown.DropdownItem)
    app.component('el-link', ElLink)
    app.component('el-tooltip', ElTooltip)
  }
}
